package com.zycfc.zsf.boot.redis;

import java.io.*;
import com.zycfc.zsf.boot.redis.enums.*;
import org.springframework.data.redis.core.*;
import java.util.*;

public interface IRedisOperater
{
    public static final String KEY_CHAR_SET = "UTF-8";
    public static final String OK = "OK";
    public static final String NO_MEMBER_PARAM = "\u7f3amember\u53c2\u6570";
    public static final String NX = "NX";
    public static final String PX = "PX";
    public static final String EX = "EX";
    
    String getNamespace();
    
    default String key(final String key) {
        if (null == key || key.length() == 0) {
            throw new IllegalArgumentException("key is empty!");
        }
        return this.getNamespace() + key;
    }
    
    default byte[] field(final Object field) {
        if (null == field) {
            throw new IllegalArgumentException("field is empty!");
        }
        final String str = String.valueOf(field);
        if (str.length() == 0) {
            throw new IllegalArgumentException("field is empty!");
        }
        try {
            return str.getBytes("UTF-8");
        }
        catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }
    
    Boolean exists(final String p0);
    
    Boolean exists(final String p0, final boolean p1);
    
     <T> void set(final String p0, final T p1);
    
     <T> void set(final String p0, final T p1, final CacheTypeEnum p2);
    
     <T> void set(final String p0, final T p1, final CacheTypeEnum p2, final long p3);
    
     <T> void set(final String p0, final T p1, final boolean p2);
    
     <T> void set(final String p0, final T p1, final boolean p2, final CacheTypeEnum p3);
    
     <T> void set(final String p0, final T p1, final boolean p2, final CacheTypeEnum p3, final long p4);
    
     <T> void setex(final String p0, final T p1, final int p2);
    
     <T> void setex(final String p0, final T p1, final int p2, final boolean p3);
    
     <T> void setex(final String p0, final T p1, final int p2, final CacheTypeEnum p3);
    
     <T> void setex(final String p0, final T p1, final int p2, final CacheTypeEnum p3, final long p4);
    
     <T> boolean setnx(final String p0, final T p1, final int p2);
    
     <T> boolean setnx(final String p0, final T p1, final int p2, final CacheTypeEnum p3);
    
     <T> boolean setnx(final String p0, final T p1, final int p2, final CacheTypeEnum p3, final long p4);
    
     <T> T get(final String p0);
    
     <T> T getWithoutSerialize(final String p0);
    
     <T> T get(final String p0, final CacheTypeEnum p1);
    
     <T> T get(final String p0, final CacheTypeEnum p1, final long p2);
    
    Long ttl(final String p0);
    
    Long ttl(final String p0, final boolean p1);
    
     <T> T get(final String p0, final boolean p1);
    
     <T> T get(final String p0, final boolean p1, final CacheTypeEnum p2, final long p3);
    
     <T> T get(final String p0, final boolean p1, final CacheTypeEnum p2, final long p3, final boolean p4);
    
     <T> T get(final String p0, final CacheTypeEnum p1, final long p2, final Object p3);
    
     <T> T get(final String p0, final boolean p1, final CacheTypeEnum p2, final long p3, final Object p4, final boolean p5);
    
     <T> T getSet(final String p0, final T p1);
    
    Long delete(final String p0);
    
    Long delete(final String p0, final boolean p1);
    
    boolean expire(final String p0, final int p1);
    
    boolean expire(final String p0, final int p1, final boolean p2);
    
    long incr(final String p0);
    
    long incrBy(final String p0, final int p1);
    
    long decr(final String p0);
    
    long decrBy(final String p0, final int p1);
    
     <F> Boolean hexists(final String p0, final F p1);
    
     <F, T> long hset(final String p0, final F p1, final T p2);
    
     <F, T> long hset(final String p0, final F p1, final T p2, final boolean p3);
    
     <F, T> boolean hsetnx(final String p0, final F p1, final T p2);
    
     <F, T> void hmset(final String p0, final Map<F, T> p1);
    
     <F, T> T hget(final String p0, final F p1);
    
     <F, T> T hget(final String p0, final F p1, final boolean p2);
    
     <T> Map<String, T> hgetAll(final String p0);
    
     <T> Map<String, T> hgetAll(final boolean p0, final String p1);
    
     <T> Map<String, T> hgetAll(final String p0, final boolean p1);
    
     <T> Map<String, T> hgetAll(final boolean p0, final String p1, final boolean p2);
    
     <T> List<T> hmget(final String p0, final Object... p1);
    
     <T> List<T> hmget(final boolean p0, final String p1, final Object... p2);
    
    long hdel(final String p0, final Object... p1);
    
    long hdel(final boolean p0, final String p1, final Object p2);
    
     <F> long hincrBy(final String p0, final F p1, final int p2);
    
     <T> T lpop(final String p0);
    
     <T> T rpop(final String p0);
    
     <T> Long lpush(final String p0, final T... p1);
    
     <T> Long lpushx(final String p0, final T... p1);
    
     <T> Long rpush(final String p0, final T... p1);
    
     <T> Long rpushx(final String p0, final T... p1);
    
     <T> T lindex(final String p0, final int p1);
    
     <T> Long linsertAfter(final String p0, final T p1, final T p2);
    
     <T> Long linsertBefore(final String p0, final T p1, final T p2);
    
    Long llen(final String p0);
    
     <T> List<T> lrange(final String p0, final int p1, final int p2);
    
     <T> long lrem(final String p0, final int p1, final T p2);
    
     <T> boolean lset(final String p0, final int p1, final T p2);
    
    boolean ltrim(final String p0, final int p1, final int p2);
    
     <T> long zdd(final String p0, final double p1, final T p2);
    
    long zcount(final String p0, final double p1, final double p2);
    
     <T> Set<T> zrange(final String p0, final long p1, final long p2);
    
     <T> Set<ZSetOperations.TypedTuple<T>> zrangeWithScores(final String p0, final long p1, final long p2);
    
     <T> Set<T> zrangeByScore(final String p0, final double p1, final double p2);
    
     <T> Set<ZSetOperations.TypedTuple<T>> zrangeByScoreWithScores(final String p0, final double p1, final double p2);
    
    long zrem(final String p0, final Object... p1);
    
    Object eval(final String p0, final String p1, final Object... p2);
    
    Object evalSha(final byte[] p0, final String p1, final Object... p2);
    
    byte[] scriptLoad(final byte[] p0, final String p1);
    
    long sadd(final String p0, final Object... p1);
    
    long scard(final String p0);
    
     <T> boolean sisMember(final String p0, final T p1);
    
     <T> Set<T> smembers(final String p0);
    
     <T> T spop(final String p0);
    
     <T> List<T> srandMember(final String p0, final int p1);
    
     <T> T srandMember(final String p0);
    
    long srem(final String p0, final Object... p1);
    
    List<String> multiGet(final Collection<String> p0);
    
     <T> boolean setNxPx(final String p0, final T p1, final long p2);
    
     <T> boolean setNxPxWithSerialize(final String p0, final T p1, final long p2);
    
     <T> boolean setNxEx(final String p0, final T p1, final long p2);
    
     <T> boolean setNxExWithSerialize(final String p0, final T p1, final long p2);
    
     <T> long lrem(final String p0, final int p1, final byte[] p2);
}
